<?php

if(!defined('OI')) {
			
	print '<h1>Access Error</h1>Sorry, this file can not be accessed directly, this is strictly forbidden!';
	exit();
				
}

class Logout {

	# Store digitalUniversity
	private $digitalUniversity = NULL;

	/*
	 * Constructor: Store instance of sitebuilder
	 * 	- PHP5 now uses pass by reference so we do not need to store the reference
	*/
	public function __construct(DigitalUniversity &$digitalUniversity) {
	
		$this->digitalUniversity =& $digitalUniversity;
				
	}
	
	/*
	 * Destructor: Clean memory parts
	*/
	public function __destruct() {
		
		unset($this->digitalUniversity);
		
	}
	
	/*
	 * loadPage: Detect the current page being viewed and output the relevant
	 * page contents
	*/
	public function outputPage() {
		
		$this->digitalUniversity->clearSession();
		
		return $this->digitalUniversity->redirect('login');
										
	}
		
}

?>